<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .box::before {
            position: absolute;
            content: '';
            display: block;
            width: 100px;
            height: 150px;
            background-color: pink;
            border-top-left-radius: 75px;
            border-top-right-radius: 75px;
            transform: rotate(-45deg);
            animation: heart-before 1s infinite alternate;
            box-shadow: -5px -5px 10px grey;
        }

        .box::after {
            position: absolute;
            content: '';
            display: block;
            width: 100px;
            height: 150px;
            background-color: pink;
            border-top-left-radius: 75px;
            border-top-right-radius: 75px;
            transform: translate(35px) rotate(45deg);
            animation: heart-after 1s infinite alternate;
        }

        @keyframes heart-before {
            0% {
                transform: rotate(-45deg);
            }
            100% {
                transform: scale(2) rotate(-45deg);
            }
        }

        @keyframes heart-after {
            0% {
                transform: translate(35px) rotate(45deg);
            }
            100% {
                transform: scale(2) translate(35px) rotate(45deg);
            }
        }

    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>